"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var props = {
    name: 'smd',
    age: 18
};
function proxify(obj) {
    var rest = {};
    var _loop_1 = function (key) {
        rest[key] = {
            get: function () {
                return obj[key];
            },
            set: function (value) {
                obj[key] = value;
            }
        };
    };
    for (var key in obj) {
        _loop_1(key);
    }
    return rest;
}
var proxyProps = proxify(props);
console.log(proxyProps);
// 取消代理
function unProxify(t) {
    var rest = {};
    for (var key in t) {
        rest[key] = t[key].get();
    }
    return rest;
}
var originProps = unProxify(proxyProps);
console.log(originProps);
